import http from "@/utils/http";

/** 知识采编 */

/** 第一阶段 */
// 知识采编状态
export async function getKnowledgeCollectStatus(params) {
    return http.get("/knowledgeCollect/knowledgeCollectStatus", params)
}

// 上传文档
export async function uploadFile(data) {
    return http.uploadFile("/knowledgeCollect/doc/upload", data)
}

// 生成问题
export async function postGenerateQuestions(data) {
    return http.post("/knowledgeCollect/generateQuestions", data)
}

// 生成问题任务百分比
export async function getGenerateQuestionsRadio(params) {
    return http.get("/knowledgeCollect/generateQuestionsRadio", params)
}

// 自建文档编辑开始
export async function editDocStart(params) {
    return http.get("/knowledgeCollect/editDoc/start", params)
}

// 取消采编
export async function cancelKnowledgeCollect(params) {
    return http.get("knowledgeCollect/cancelKnowledgeCollect", params)
}


/** 第二阶段 */
// 问题列表查看
export async function getGenerateQuestionsList(params) {
    return http.get("/knowledgeCollect/generateQuestions/list", params)
}

// 问题编辑
export async function postGenerateQuestionsEdit(data) {
    return http.post("/knowledgeCollect/generateQuestions/edit", data)
}

// 问题批量删除
export async function postGenerateQuestionsDel(data) {
    return http.post("/knowledgeCollect/generateQuestions/delBatch", data)
}

// 手动添加问题
export async function postGenerateQuestionsAdd(data) {
    return http.post("/knowledgeCollect/addGenerateQuestions", data)
}

// 相似问问题列表查看
export async function getSimilarQuestionsList(params) {
    return http.get("/knowledgeCollect/similarQuestionsList", params)
}

// 手动批量添加相似问
export async function postSimilarQuestionsAdd(data) {
    return http.post("/knowledgeCollect/batchAddSimilarQuestions", data)
}


/** 第三阶段 */
// 生成答案
export async function postGenerateAnswers(data) {
    return http.post("/knowledgeCollect/generateAnswers", data)
}

// 生成答案任务百分比
export async function getGenerateAnswersRadio(params) {
    return http.get("/knowledgeCollect/generateAnswersRadio", params)
}

// 答案列表查看
export async function getGenerateAnswersList(params) {
    return http.get("/knowledgeCollect/generateAnswers/list", params)
}

// 答案详情
export async function getGenerateAnswersDetail(params) {
    return http.get("/knowledgeCollect/generateAnswers/detail", params)
}

// 预览 上一个 下一个
export async function getGenerateAnswersChangePosition(params) {
    return http.get("/knowledgeCollect/generateAnswers/changePosition", params)
}

// 答案 关联片段删除
export async function getGenerateAnswersDelRelPara(params) {
    return http.get("/knowledgeCollect/generateAnswers/delRelPara", params)
}

// 答案 重新搜索
export async function getGenerateAnswersReSearch(params) {
    return http.get("/knowledgeCollect/generateAnswers/reSearch", params)
}

// 答案 片段列表
export async function getGenerateAnswersAnswerPara(params) {
    return http.get("/knowledgeCollect/generateAnswers/answerPara", params)
}

// 答案 重新选择片段
export async function getGenerateAnswersReChoose(params) {
    return http.get("/knowledgeCollect/generateAnswers/reChoose", params)
}

// 答案 片段选择
export async function postGenerateAnswersReOperate(data) {
    return http.post("/knowledgeCollect/generateAnswers/reOperate", data)
}


// 答案 重新生成答案
export async function postGenerateAnswersReGenerate(data) {
    return http.post("/knowledgeCollect/generateAnswers/reGenerate", data)
}

// 答案 取消操作
export async function getGenerateAnswersCancelOperate(params) {
    return http.get("/knowledgeCollect/generateAnswers/cancelOperate", params)
}

// 答案 
export async function getGenerateAnswersDelAnswer(params) {
    return http.get("/knowledgeCollect/generateAnswers/delAnswer", params)
}

// 答案 批量删除答案
export async function postGenerateAnswersDelAnswer(data) {
    return http.post("/knowledgeCollect/generateAnswers/delAnswers", data)
}

// 模板市场-->获取所有的问答知识点分类
export async function knowledgeAllQaCategoryTree(params) {
	return http.get('/knowledge/systemTemplate/getAllQaCategoryTree', params);
}

// 答案 添加知识点
export async function postGenerateAnswersAddKnowledge(data) {
    return http.post("/knowledgeCollect/generateAnswers/addKnowledges", data)
}

// 答案 保存答案or问题
export async function postGenerateAnswersEdit(data) {
    return http.post("/knowledgeCollect/generateAnswers/edit", data)
}





